Jetfire Wiki
Jazz CMS
Debug
Jetfire Core
Jetfire Language
Jetfire Web Part
Library
Release Notes
Roles
States
Web Service
Workflow Administration
Quick Search
»
Advanced Search »
Back
Access Construct
Modified on 2012/01/20 21:02
by
John
Categorized as
Uncategorized
===Access Construct=== The access construct can be added to a property or method declaration making the [dynamic access modifier|access modifier dynamic]. That is a method's or property's access modifier (whether it is private or public) can change depending on role of the [login|logged in user]. For example 'MyMethod' will be 'public' when the [login|logged in user] has the [role] 'MyRole'. When the logged in user does not have the role 'MyRole' then the method 'MyMethod' will be private. Note: ''The access modifier changes the run time appearance of the property or the method, not whether a property or method is public or private at compile time. This means that other code can still use a method or property. Only at run time, when the method or property is called, will access roles be checked against the [login|login user] roles.'' ((({{ public void MyMethod() :access(MyRole){br} { {br} ...{br} }{br} }}))) The access construct can also be used with properties. ((({{ public void MyProperty:access(MyRole){br} { {br} : get;{br} : set;{br} }{br} }}))) In the this example the property can be set if [login|logged in user] has the role of "MyRole". ((({{ public void MyProperty{br} { {br} : get;{br} : set:access(MyRole);{br} }{br} }}))) Note: ''The access construct can not be used to assign roles to a workflow object. Workflow objects must have [role#rolesToworkflowprogrammatically|roles assigned programmatically].'' The access construct can also use a boolean property as parameter. See [http://jetfire.codeplex.com/Wiki/View.aspx?title=Controling%20when%20a%20Method%20or%20Property%20can%20be%20called&referringTitle=C-Sharp%20Examples|Basket Example (Controlling when a method can be called)]
Meta Keywords:
Meta Description:
Change Comment:
ScrewTurn Wiki
version 3.0.4.560. Some of the icons created by
FamFamFam
.